import {SecurityRole} from "type/entity/SecurityRole";

/**
 * 角色表单数据转换器,处理角色ROLE_前缀
 * @param values
 */
export const formDataConverter = (values: SecurityRole) => {
    if (!values.authority.startsWith("ROLE_")){
        values.authority = "ROLE_" + values.authority.toUpperCase();
    }
    return values;
};